#ifndef HUB_H
#define HUB_H

#include "Building.h"
class Hub final : public Building
{
public:
    Hub();

    std::vector<GridVec> BuildingAllPos() override;
    bool IsPlace(const GridVec &click, int picdirection, GameMap &gamemap) override;
    bool CanReceive(GridVec source, int directionin, int shapename) override;
    void Receive(GridVec source, int directionin, int shapename) override;
    void TickableRunning() override;
    void UpdateTickableState(GameMap &gamemap) override;
    void UpdateNeed();
    bool getUpgradehub() const;
    void setUpgradehub(bool newUpgradehub);

    bool getIncrease_item_value() const;
    void setIncrease_item_value(bool newIncrease_item_value);

    int getMoney() const;
    void setMoney(int newMoney);

    int getCurrent_have() const;
    void setCurrent_have(int newCurrent_have);

    int getNeed_shape_name() const;
    void setNeed_shape_name(int newNeed_shape_name);

    int getNeed() const;
    void setNeed(int newNeed);

    void consume(int value);

private:
    /**
     * \brief 当前等级需要的物品个数
     */
    int need;

    /**
     * \brief 当前等级需要的物品类型
     */
    int need_shape_name;

    /**
     * \brief 当前等级已提交物品个数
     */
    int current_have;

    int money;

    bool increase_item_value;

    bool upgradehub;
};

#endif // HUB_H
